﻿using ORMConfiger.Sugar;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DBContext
{
    public class SugarContext<TEntity> : BaseContext<TEntity> where TEntity : class, new()
    {
        private SugarConfiger _sugar;

        public SugarContext(SugarConfiger sugar)
        {
            _sugar = sugar;
            EntityContext = _sugar.GetEntityContext<TEntity>();
        }

        public override object GetContext()
        {
            return _sugar.SugarClient;
        }
    }
}
